﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;

public partial class test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Server.Transfer("~/upload/courseware/1.doc");
       // Response.Redirect("~/upload/courseware/1.rar");
       // Console.WriteLine("aaaaaa");
        string coursewareID = "3";
        db_courseware cw = new db_courseware();
        DataSet ds = cw.selectCoursewareByCourseID(coursewareID);
        string coursewareUrl = ds.Tables[0].Rows[0]["coursewareUrl"].ToString();
        string file=Server.MapPath(coursewareUrl);
        if (File.Exists(file))
        {
            Response.Write("aaa!~");
        }
        else
        {
            Response.Write("~~~~~~");
        }
    }
}